home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / math / gle-3.000 / gle-3 / gle / glepro.h < prev    next >
C/C++ Source or Header  |  1995-02-07  |  7KB  |  193 lines

  1. #include "int32.h"
  2. #define SC (char *)
  3. #define UC (unsigned char *)
  4.  
  5. struct op_key { char *name; int typ; int pos; int32 idx; } ;
  6. typedef struct op_key (*OPKEY)[];
  7. typedef char (*(*TOKENS)[]);
  8. #ifndef gotuchar
  9. typedef unsigned char uchar;
  10. #endif
  11. typedef double dbl;
  12.  
  13.  
  14. #ifdef unix
  15. #define READ_BIN "r"
  16. #define WRITE_BIN "w"
  17. #else
  18. #define READ_BIN "rb"
  19. #define WRITE_BIN "wb"
  20. #endif
  21.  
  22. double myatan2(double y, double x);
  23.  
  24. int w_message(char *s);
  25.  
  26. int char_bbox(int ff,int cc,double *xx1, double *yy1, double *xx2, double *yy2);
  27.  
  28. int df_circle_fill(dbl r);
  29. int df_circle_stroke(dbl r);
  30. int df_box_fill(dbl x1, dbl y1, dbl x2, dbl y2);
  31. int df_box_stroke(dbl x1, dbl y1, dbl x2, dbl y2);
  32. int df_arc(dbl r,dbl t1,dbl t2,dbl cx,dbl cy);
  33. int df_narc(dbl r,dbl t1,dbl t2,dbl cx,dbl cy);
  34. int df_arcto(dbl x1, dbl y1, dbl x2, dbl y2, dbl r);
  35.  
  36. int g_defmarker(char *mname,char *font, int ccc, double dx, double dy, double sz, int autodx);
  37. int var_getstr(int v, char *s);
  38. int sub_clear(void);
  39. int freeavec(void);
  40. int freeafont(void);
  41. double tex_xend(void);
  42. double tex_yend(void);
  43. int setdstr(char **s, char *in);
  44. int alloc_temp(int n);
  45. int gle_abort(char *s);
  46. int d_tidyup(void);
  47. int text_inkey(void);
  48. char *gle_top(void);
  49. char *gledir(char *filename);
  50. int ncpy(char *d, char *s, int n);
  51. int pass_font(char *s);
  52. int pass_justify(char *s);
  53. unsigned long coreleft(void);
  54. unsigned long farcoreleft(void);
  55.  
  56. int32 mem_total(void);
  57. int32 mem_worst(void);
  58. int token_space(void);
  59. int var_set_global(void);
  60. int var_free_local(void);
  61. int pass_marker(char *s);
  62. #ifdef unix
  63. #else
  64. void wprintf(va_list arg_list, ...);
  65. #ifndef GPRINTDEF
  66. void gprint(va_list arg_list, ...);
  67. #endif
  68. #endif
  69. char *sdup(char *s);
  70. void myfree(void *p);
  71. void myfrees(void *p, char *s);
  72. void *myallocn(int32 nitems,int32 size);
  73. void *myalloc(int32 size);
  74. void *myallocz(int32 size);
  75.  
  76. double graph_xgraph(double v);
  77. double graph_ygraph(double v);
  78. int showpcode(int32 *p);
  79. int do_pcode(int *srclin, int32 *pcode, int plen, int *pend);
  80. int g_close(void);
  81. int axis_type(char *s);
  82. int g_set_hei(double h);
  83. int g_get_hei(double *h);
  84. int g_marker(int i, double sz);
  85. int g_marker2(int i, double sz, double dval);
  86. int draw_markers(void);
  87. int box_clip(double *x1, double *y1, double xmin, double ymin, double xmax, double ymax);
  88. int gr_nomiss(int i);
  89. int draw_vec(double x1, double y1, double x2, double y2);
  90. int draw_mark(double x1, double y1, int i, double sz, double dval);
  91. int gclip(double *x1,double *y1, double *x2, double *y2
  92.     ,double xmin, double ymin, double xmax, double ymax, int *invis);
  93. int g_hint(char *s);
  94. int g_gsave(void);
  95.  
  96. int add_f(char *pcode,int *plen,double f);
  97. int add_fn(char *pcode, int *plen, int i);
  98. int add_i(char *pcode,int *plen,int32 i);
  99. int add_pcode(char *pcode,int *plen,char *fcode,int *flen);
  100. int add_string(char *pcode, int *plen, char *s);
  101. int add_var(char *pcode,int *plen,int i);
  102. char *eval_str(int32 *pcode,int *plen);
  103. char *find_non_space(char *cp);
  104. char *find_term(char *cp);
  105. char *un_quote(char *ct);
  106. int char_kern(int cf,int c1, int c2, float *w);
  107. int char_lig(int cf,uchar *c1, int c2);
  108. int cmd_name(int idx, char **cp);
  109. int32 pass_color(char *s);
  110. int debug_polish(int32 *pcode,int *zcp);
  111. int eval(int32 *pcode,int *cp,double *oval,char *ostr,int *otyp);
  112. int find_mkey(char *cp, int *idx);
  113. int find_un(char *cp, int *idx,int *ret,int *np,int **plist);
  114. int font_get_lineskip(double *ls,double *gap);
  115. int font_get_parskip(double *ls,double *gap);
  116. void font_init(void);
  117. void font_load(void);
  118. int font_load_metric(int ff);
  119. int font_set(char *s);
  120. int get_color(TOKENS tk,int *ntok,int *curtok,int32 *pcode,int *plen);
  121. int get_fill(TOKENS tk,int *ntok,int *curtok,int32 *pcode,int *plen);
  122. int get_font(char (*(*tk)[500]),int *ntok,int *curtok,int32 *pcode,int *plen);
  123. int get_justify(TOKENS tk,int *ntok,int *curtok,int32 *pcode,int *plen);
  124. int get_marker(TOKENS tk,int *ntok,int *curtok,int32 *pcode,int *plen);
  125. int get_str(char **s,int l,FILE *fmt);
  126. int gle_include(char *s);
  127. int32 gt_first(OPKEY lkey, int *curtok, TOKENS tk, int *ntok, int32 *pcode, int *plen);
  128. int32 gt_firstval(OPKEY lkey,char *s);
  129. int gt_optional(OPKEY lkey, int *curtok, TOKENS tk, int *ntok, int32 *pcode, int *plen);
  130. int gt_xy(int *curtok, char (*(*tk)[500]), int *ntok,    int32 *pcode, int *plen);
  131. int isnumber(char *s);
  132. int lastchar(char *s, char c);
  133. int sub_def(char *s);
  134. int mystrcpy(char **d,char *s);
  135. int name_get(char *n,double *x1,double *y1,double *x2,double *y2);
  136. int name_set(char *n,double x1,double y1,double x2,double y2);
  137. int passt(int srclin,char *source,TOKENS tk,int *ntok,int32 *pcode,int *plen);
  138. int polar_xy(double r, double angle, double *dx, double *dy);
  139. int zpolish(TOKENS tk,int *ntok,int *curtok,char *pcode,int *plen,int *rtype);
  140. int polish(char *expr,char *pcode,int *plen,int *rtype);
  141. int scheck(int v);
  142. int set_glue(int32 *in,int ilen,double actual,double width,double stretch,double shrink,double *setlen);
  143. int spop(int v);
  144. int spush(int v);
  145. int stack_op(char *pcode, int *plen, int stk[] , int stkp[], int *nstk,  int i, int p);
  146. int sub_call(int idx,double *pval,char **pstr,int *npm, int *otyp);
  147. int sub_find(char *s,int *idx,int *zret, int *np, int **plist);
  148. int sub_get_startend(int idx, int *ss, int *ee);
  149. int sub_param(int idx,char *s);
  150. int sub_set_return(double d);
  151. int sub_set_startend(int idx, int ss, int ee);
  152. int subscript();
  153. int subscript();
  154. int testfree(int i);
  155. int text_block(uchar *s,double width,int justify);
  156. int text_draw(int32 *in,int ilen);
  157. int text_printf(int32 *in,int ilen);
  158. int text_tomacro(uchar *in, uchar *out);
  159. int text_topcode(uchar *in, int32 *out, int *lout)      /*  passed a paragraph  */;
  160. int text_wrapcode(int32 *in,int ilen,double width);
  161. int token(char *lin,TOKENS tok,int *ntok,char *outbuff);
  162. int token_data(char *lin,char *tk[],int *ntok,char *outbuff);
  163. int var_add(char *name,int *idx,int *type)    /* Add a variable to the list */;
  164. int var_alloc_local(void);
  165. int var_clear_global(void);
  166. int var_set_local(void);
  167. int var_find(char *name,int *idx,int *type)    /* Find a variable in the list */;
  168. int var_findadd(char *name,int *idx,int *type)    /* Add a variable to the list */;
  169. int var_free_local();
  170. int var_get(int jj, double *v);
  171. int var_nlocal(int *l);
  172. int var_set(int jj, double v);
  173. int var_set_global();
  174. int var_set_local();
  175. int var_setstr(int jj, char *s);
  176. int xy_polar(double dx,double dy,double *radius,double *angle);
  177. void mark_clear(void);
  178. void for_init(void);
  179. void f_init(void);
  180. int dr_init(void);
  181. int abort_key(void);
  182. void add_svga(void);
  183. void freefont(int i);
  184. void font_simple(void);
  185. void preview_big(void);
  186. void gr_thrownomiss(void);
  187. void graph_freedata(void);
  188. void big_close(void);
  189. void font_replace_vector(int ff);
  190. void g_shear(double sx,double sy);
  191. void plotter_fonts(void);
  192.  
  193.